The attached patch adds -Werror to HOSTCFLAGS in Config.mk, makes
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 8 Aug 2005 08:32:52 +0000 (08:32 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 8 Aug 2005 08:32:52 +0000 (08:32 +0000)
xen/tools actually use HOSTCFLAGS (it was already using HOSTCC), and
fixes some gcc-4.0 signedness warnings in xen/tools/symbols.c.

Signed-off-by: Josh Triplett <josht@us.ibm.com>
Config.mk
xen/tools/Makefile
xen/tools/symbols.c

index facf5ec1236a48778740f819f21fcee3da5e4c09..2eb5eae86fb055720dca56261af8ca91b3140837 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -7,7 +7,7 @@ XEN_TARGET_X86_PAE  ?= n
 
 # Tools to run on system hosting the build
 HOSTCC     = gcc
-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 
+HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
 
 AS         = $(CROSS_COMPILE)as
 LD         = $(CROSS_COMPILE)ld
index 04d7020cd82384348a0274e0bbab3fbca4713a97..4d353617bd1da8fed93fa2319a756f848b62e67e 100644 (file)
@@ -10,4 +10,4 @@ clean:
        rm -f *.o symbols
 
 symbols: symbols.c
-       $(HOSTCC) -o $@ $<
+       $(HOSTCC) $(HOSTCFLAGS) -o $@ $<
index a5665cc1240993e3e530148a07a641ebfaaf585e..7bc141e2108f73d3b3ca76f76a5379c498ad70d0 100644 (file)
@@ -152,8 +152,8 @@ read_symbol(FILE *in, struct sym_entry *s)
        /* include the type field in the symbol name, so that it gets
         * compressed together */
        s->len = strlen(str) + 1;
-       s->sym = (char *) malloc(s->len + 1);
-       strcpy(s->sym + 1, str);
+       s->sym = (unsigned char *) malloc(s->len + 1);
+       strcpy((char *)s->sym + 1, str);
        s->sym[0] = s->type;
 
        return 0;
@@ -197,16 +197,16 @@ symbol_valid(struct sym_entry *s)
                 * move then they may get dropped in pass 2, which breaks the
                 * symbols rules.
                 */
-               if (s->addr == _etext && strcmp(s->sym + offset, "_etext"))
+               if (s->addr == _etext && strcmp((char *)s->sym + offset, "_etext"))
                        return 0;
        }
 
        /* Exclude symbols which vary between passes. */
-       if (strstr(s->sym + offset, "_compiled."))
+       if (strstr((char *)s->sym + offset, "_compiled."))
                return 0;
 
        for (i = 0; special_symbols[i]; i++)
-               if( strcmp(s->sym + offset, special_symbols[i]) == 0 )
+               if( strcmp((char *)s->sym + offset, special_symbols[i]) == 0 )
                        return 0;
 
        return 1;